<template>
  <div class="userinfo2">
    <el-button
      type="primary"
      icon="el-icon-search"
      circle
      @click="drawer = true"
    ></el-button>
    <el-drawer title="个人中心" :visible.sync="drawer" :direction="direction"
    :append-to-body="true">
      <span> 
          <slot></slot>
      </span>
    </el-drawer>
  </div>
</template>

<script>
export default {
  data() {
    return {
      drawer: false,
      direction: "rtl",
    };
  },
};
</script>

<style lang="scss" scoped>

element.style {

    width: 20vw;
}

</style>